project(Render)
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED on)

set(EXTERNAL_DIR ${CMAKE_SOURCE_DIR}/external)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/modules")

add_definitions(-DRESOURCE_PATH="${CMAKE_SOURCE_DIR}/resource")

find_package(Vulkan REQUIRED)

include_directories(${Vulkan_INCLUDE_DIR})
link_directories("${EXTERNAL_DIR}/Libs")
include_directories("${EXTERNAL_DIR}/Include")
set(LIBS ${Vulkan_LIBRARY} glfw)

set(RENDERER_SOURCE "${CMAKE_SOURCE_DIR}/renderer/Context.cpp"
        "${CMAKE_SOURCE_DIR}/renderer/Vulkan_util.cpp"
        "${CMAKE_SOURCE_DIR}/renderer/Renderer.cpp"
        "${CMAKE_SOURCE_DIR}/renderer/Util.cpp"
        "${CMAKE_SOURCE_DIR}/ShowBase.cpp")

add_executable(apptest WIN32 Main.cpp ${RENDERER_SOURCE})
target_link_libraries(apptest ${LIBS})
